remote watch list
/icons/hr.icon
private projectも混じっている
idとlastAccessedのみ同期するコード
code:import.js
const json = await res.json();
const prev = JSON.parse(localStorage.getItem("projectsLastAccessed"));
// 一番新しいアクセス日時を採用する
.map((key) => [key, Math.max(jsonkey ?? 0, prevkey ?? 0)]); localStorage.setItem("projectsLastAccessed", JSON.stringify(Object.fromEntries(newData)));
code:export.js
const blob = new Blob(
{ type: "application/json" },
);
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "projectsLastAccessed.json";
document.body.append(a);
a.click();
a.remove();